home *** CD-ROM | disk | FTP | other *** search
/ Hot Metal Pro 4.0 / Hot Metal Pro 4.0.iso / HMPTools / VRCreate / data.z / Rotatable - Pitch.beh < prev    next >
Encoding:
Text File  |  1996-07-01  |  489 b   |  22 lines

  1. #VRML V2.0 utf8 - PLATINUM technology, inc. 1997
  2. #ADD_PLANE_SENSOR
  3.  
  4. #animations
  5. DEF $OBJECT_Pitchable Script {
  6.     eventIn     SFVec3f        translationIn    
  7.     eventOut    SFRotation    Pitch
  8.     field        SFRotation    newRotation    1 0 0 0
  9.     url "javascript:
  10.         function  translationIn(value)
  11.         {
  12.          newRotation[3]=-value[1]/2;
  13.          Pitch=newRotation;
  14.         }
  15.     "
  16. }
  17. #route map
  18.  
  19. ROUTE $OBJECTPS.translation_changed  TO  $OBJECT_Pitchable.translationIn
  20. ROUTE $OBJECT_Pitchable.Pitch TO $OBJECT.set_rotation
  21.  
  22.